package es.prodevelop.arport;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class RoadmapActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.roadmap);

		TabSpec spec = null;
		TabHost host = (TabHost) findViewById(R.id.roadmap_tabhost);
		host.setup();

		spec = host.newTabSpec("TAB1");
		spec.setIndicator(getResources().getString(R.string.heritage_tab), null);
		spec.setContent(R.id.heritageWebView);
		host.addTab(spec);

		spec = host.newTabSpec("TAB2");
		spec.setIndicator(getResources().getString(R.string.leisure_tab), null);
		spec.setContent(R.id.leisureImageView);
		host.addTab(spec);

		host.setCurrentTabByTag("TAB1");

		WebView heritageWebView = (WebView) findViewById(R.id.heritageWebView);
		heritageWebView.setWebChromeClient(new WebChromeClient());
		heritageWebView.getSettings().setLoadsImagesAutomatically(true);
		heritageWebView.getSettings().setDatabaseEnabled(true);
		heritageWebView.getSettings().setAppCacheEnabled(true);
		heritageWebView.getSettings().setDomStorageEnabled(true);
		heritageWebView.getSettings().setJavaScriptEnabled(true);
		heritageWebView.loadUrl("file:///android_asset/roadmap.html");

	}
}
